Repository navigation
test(e2e): Test the create wizard's model choices through dev, build, deploy and invoke, under a tui tag - #2973
Merged
Conversation
…s code, then dev, build, deploy and invoke, under a tui tag
mquang-amazon
force-pushed
the
test/e2e-model-providers
branch
from
December 1, 2026 01:10
4e4c9c8 to
3fdc80b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## box-integration #2973 +/- ##
================================================
Coverage 96.95% 96.95%
================================================
Files 780 780
Lines 70884 70884
================================================
Hits 68723 68723
Misses 2161 2161 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tejaskash
approved these changes
Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
End-to-end tests for the model choices of the interactive create wizard (TUI), under a new
tuitag.agentcore createtakes no model flags, so the tests create each project through the wizard's own code, then run dev, build, deploy and invoke through the CLI.Stacked on #2959. This branch is #2959's e2e changes (the split test files,
templates-test-support.ts, the Vitest caps) without the TUI commits that #2959 carried for testing, plus the commits below. Merge #2959 first; this PR's own diff is then the three files below.e2eTest/helpers/create-with-model-provider.ts: creates a project as the wizard does when the user picks a model provider. It builds the input withresolveRuntimeTemplateShortcut(template, { modelProvider, modelId, apiKey, apiBase })and runs the project manager'screate, the code thatagentcore createruns after the wizard. Tests run it withbunin the folder to create in, because create writes into the current directory. A project it creates is identical to one the wizard creates for the same answers, apart from its name.e2eTest/project/modelProviders.test.ts, tagtui:modelProviderinagentcore.json, the API key as a project credential and never inagentcore.json, and the model ID in the agent's code.agent-python-strands-boxon Anthropic, OpenAI, OpenAICompatible (the OpenAI API,gpt-4o-mini), Gemini, and LiteLLM (openai/gpt-4o-mini). CI has no keys for these providers, so each takes a test key and expects the provider's own refusal of it, underagentcore devand on AgentCore Runtime: the agent's model call left the box through its egress route, with the key, and reached the provider.blocked by egress control, or no refusal, fails the test.e2eTest/constants.ts: thetuitag.What the deploy tests found
The deploy tests fail on the Runtime today, and that is what they are for:
AGENTCORE_CREDENTIAL_AGENT<PROVIDER>APIKEY is not set. The Runtime profile sent the provider's route through the Box gateway and dropped itsenv://secret, so box gave the agent no stand-in under that variable, whichmodel/load.py(fix(box): Read a boxed agent's model provider key from the box, not AgentCore Identity #2953) requires. fix(box): Keep the env:// secret of an [egress] route in the Runtime profile #2970 keeps the secret.bedrock/…and a key: the same error, also underagentcore dev. That model calls Bedrock through the box's AWS-signed Bedrock route, so no route names the key's variable. The fix on branchfix/box-litellm-bedrock-keyrefuses the key in that case; the test usesopenai/gpt-4o-mini, which takes the key.Related Issue
Closes #
Documentation PR
No documentation change.
Type of Change
Testing
How have you tested the change?
bun test: no change to unit tests or shipped code.bun run test:e2e: the 53 create tests pass locally. The deploy tests ran in CI with the same projects made through create flags (run https://github.com/aws/agentcore-cli/actions/runs/46516669467), with the results above; a run of this branch with fix(box): Keep the env:// secret of an [egress] route in the Runtime profile #2970 is to follow.bun run typecheckbun run lint:checkbun run format:checkbun run auditbun run secrets:checkbun run buildsrc/assets/, I updated affected snapshots: no change tosrc/assets/.command.md(the release workflow regenerates it)Checklist